package dk.flashnotes.fff.logger {

	/**
	 * @author jk
	 */
	public class DefaultTraceLogRouter implements IFFFLogRouter {

		private static var _oInstance : DefaultTraceLogRouter;
		private static var _bCreatingInstance : Boolean = false;
		
		public function DefaultTraceLogRouter() {
			if( !_bCreatingInstance ) throw new Error( "Singleton and can only be accessed through DefaultTraceLogRouter.getInstance()" );
		}
			
		public static function get_oInstance() : DefaultTraceLogRouter {
			if (!_oInstance) {
				_bCreatingInstance=true;
				_oInstance=new DefaultTraceLogRouter();
				_bCreatingInstance=false;
			}
			return _oInstance;
		}
		
		public function info(sMessage : String, ...logObjs) : void {
			trace(sMessage, logObjs);
		}
		
		public function warn(sMessage : String, ...logObjs) : void {
			trace(sMessage, logObjs);
		}
		
		public function error(sMessage : String, ...logObjs) : void {
			trace(sMessage, logObjs);
		}
		
		public function debug(sMessage : String, ...logObjs) : void {
			trace(sMessage, logObjs);
		}
	}
}
